API Documentation
Public Member Functions | List of all members
nkInputs::MouseDeviceManager Class Referencefinal

Manages the mouse devices available in the component. More...

Inheritance diagram for nkInputs::MouseDeviceManager:

Public Member Functions

MouseDeviceManagercreateOrRetrieve (const std::string_view &name)
 
MouseDeviceManagerget (const std::string_view &name)
 
void rename (const std::string_view &currentName, const std::string_view &newName)
 
void erase (const std::string_view &name)
 

Detailed Description

Manages the mouse devices available in the component.

At all times, manager owns any memory allocated inside. External code should never delete memory returned by it.

Member Function Documentation

◆ createOrRetrieve()

MouseDeviceManager* nkInputs::MouseDeviceManager::createOrRetrieve ( const std::string_view &  name)

Creates if unavailable, or retrieves if available, a mouse device.

Parameters
nameThe name of the device to retrieve.
Returns
The device requested, possibly freshly created. The manager owns the memory returned, external code should never delete it. See erase().

◆ get()

MouseDeviceManager* nkInputs::MouseDeviceManager::get ( const std::string_view &  name)

Retrieves a mouse device.

Parameters
nameThe name of the device to retrieve.
Returns
The device requested if available, nullptr else.

◆ rename()

void nkInputs::MouseDeviceManager::rename ( const std::string_view &  currentName,
const std::string_view &  newName 
)

Renames a mouse device.

Parameters
currentNameThe name of the device to rename.
newNameThe name to reassign to the device.

◆ erase()

void nkInputs::MouseDeviceManager::erase ( const std::string_view &  name)

Erases and frees a mouse device.

Parameters
nameThe name of the device to erase.

The documentation for this class was generated from the following file: